var vm = new Vue({
	el: '#app',
	data:{
		list:[
			'0001','0002','0003'
		],
		inputValue: "",
		keyworlds: ''
	},
	methods:{
		add:function(){
			this.list.push(this.inputValue);
			this.inputValue = '';
		},
		/** 删除 */
		complete: function(index){
			this.list.splice(index, 1);
		},
		clear: function () {
			this.list = [];
		},
		search: function(){
			console.log(this.keyworlds);
			return this.list.filter(item => {
				return item.indexOf(this.keyworlds) != -1;
			})
		}
	}
})
